package com.my.study.entity;

/**
 * @author: yidujun
 * @create: 2022/04/15 15:43
 */
public abstract class Parent {

    protected String name;
    protected String age;

    protected Parent() {
    }

    protected Parent(String name, String age) {
        this.name = name;
        this.age = age;
    }

    // ==== getter/setter ====

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getNameAndAge() {
        System.out.println(this);
        String name = this.getName();
        String age = this.getAge();
        return name + "  "+ age;
    }
}
